﻿
namespace System.Management.HyperV
{
    /// <summary>
    /// Represents settings of a virtual system to import. Used by the ImportVirtualSystemEx method of the Msvm_VirtualSystemManagementService class.
    /// </summary>
    /// <remarks>http://msdn.microsoft.com/en-us/library/dd379577(VS.85).aspx</remarks>
    public class ImportSettingData
    {
        private PropertyData propertyData;
        public ImportSettingData(PropertyData propertyData)
        {
            // TODO: Complete member initialization
            this.propertyData = propertyData;
        }

        /// <summary>
        /// A description of the object. This property is inherited from CIM_SettingData.
        /// </summary>
        public string Description
        {
            get;
            internal set;
        }
        /// <summary>
        /// A short description (one-line string) of the object. This property is inherited from CIM_SettingData.
        /// </summary>
        public string Caption
        {
            get;
            internal set;
        }
        /// <summary>
        /// Within the scope of the instantiating Namespace, InstanceID property opaquely and uniquely identifies an instance of this class. This property is inherited from CIM_SettingData.
        /// </summary>
        public string InstanceID
        {
            get;
            internal set;
        }
        /// <summary>
        /// The display name for this instance. In addition, the display name can be used as an index property for a search or query. (Note: The name does not have to be unique within a namespace.) This property is inherited from CIM_SettingData.
        /// </summary>
        public string ElementName
        {
            get;
            internal set;
        }
        /// <summary>
        /// Indicates whether new IDs will be generated for VMs that are imported.
        /// </summary>
        /// <remarks>
        /// TRUE: New IDs will be generated.
        /// FALSE: The IDs will remain the same.
        /// </remarks>
        public bool GenerateNewId
        {
            get;
            internal set;
        }
        /// <summary>
        /// Indicates whether the VM will be copied when imported.
        /// </summary>
        /// <remarks>
        /// TRUE: The VM will be copied when imported. The TargetVmDataRoot, TargetSnapshotDataRoot, TargetVhdDataRoot properties give the target for the new copy. The TargetResourcePaths property gives the target paths for the copies made from the resources specified in the SourceResourcePaths property.
        /// FALSE: The VM will not be copied when imported. The TargetVmDataRoot, TargetSnapshotDataRoot, TargetVhdDataRoot, and TargetResourcePaths properties are ignored.
        /// </remarks>
        public bool CreateCopy
        {
            get;
            internal set;
        }
        
        /// <summary>
        /// If set, the imported VM will have this name.
        /// </summary>
        public string Name
        {
            get;
            internal set;
        }

        /// <summary>
        /// Represents the folder for the VM data files for the VM being imported. If VM was exported without state information, this property should contain the VmDataRoot where the VM state files are present. ImportVirtualSystemEx will not import the VM if a VM was exported without a state and this property is not satisfied. If VM is exported with state, this property will contain the VmDataRoot directory under Import Directory.
        /// </summary>
        public string SourceVmDataRoot
        {
            get;
            internal set;
        }
        /// <summary>
        /// Represents the folder for the snapshot data files for the VM being imported. If VM was exported without state information, this property should contain the SnapshotDataRoot where the VM state files are present. ImportVirtualSystemEx will not import the VM if a VM was exported without a state and this property is not satisfied. If VM is exported with state, this property will contain the SnapshotDataRoot directory under Import Directory.
        /// </summary>
        public string SourceSnapshotDataRoot
        {
            get;
            internal set;
        }
        /// <summary>
        /// Represents the folder for the VM VHD data files for the VM being imported. If VM was exported without state information, this property should contain the VhdDataRoot where the VM state files are present. ImportVirtualSystemEx will not import the VM if a VM was exported without a state and this property is not satisfied. If VM is exported with state, this property will contain the VhdDataRoot directory under Import Directory. If the VHD files are being stored on different directories, they will be specified with the SourceResourcePaths and TargetResourcePaths properties. In this case, this property will be ignored.
        /// </summary>
        public string SourceVhdDataRoot
        {
            get;
            internal set;
        }
        /// <summary>
        /// Represents the target VM data root for the VM being imported if the CreateCopy property is set to TRUE. If the CreateCopy property is set to FALSE, this property is ignored.
        /// </summary>
        public string TargetVmDataRoot
        {
            get;
            internal set;
        }
        /// <summary>
        /// Represents the target snapshot data root for the VM being imported if the CreateCopy property is set to TRUE. If the CreateCopy property is set to FALSE, this property is ignored.
        /// </summary>
        public string TargetSnapshotDataRoot
        {
            get;
            internal set;
        }
        /// <summary>
        /// Represents the target VHD data root for the VM being imported if the CreateCopy property is set to TRUE. If the CreateCopy property is set to FALSE, this property is ignored.
        /// </summary>
        public string TargetVhdDataRoot
        {
            get;
            internal set;
        }
        /// <summary>
        /// If set, the imported VM will have this set as the ScopeOfResidence property.
        /// </summary>
        public string SecurityScope
        {
            get;
            internal set;
        }
        /// <summary>
        /// Array of strings that represents the current resources of the VM that is being imported. Each resource is represented as one string.
        /// </summary>
        public string[] CurrentResourcePaths
        {
            get;
            internal set;
        }
        /// <summary>
        /// Array of strings containing the source locations for the resources specified in the CurrentResourcePaths property.
        /// </summary>
        public string[] SourceResourcePaths
        {
            get;
            internal set;
        }
        /// <summary>
        /// Array of strings containing the target locations for the resources specified in the CurrentResourcePaths property.
        /// </summary>
        public string[] TargetResourcePaths
        {
            get;
            internal set;
        }
        /// <summary>
        /// Array of strings containing the FriendlyName properties of the source switches to which the VM is connected.
        /// </summary>
        public string[] SourceNetworkConnections
        {
            get;
            internal set;
        }
        /// <summary>
        /// Array of strings containing the FriendlyName properties for the target switches to which the VM is to be connected.
        /// </summary>
        public string[] TargetNetworkConnections
        {
            get;
            internal set;
        }
    }
}
